﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace MultiProcessCombine_Test
{
    class Program
    {
        static void Main(string[] args)
        {
            //Sub.MultiProcessCombine.Program.Main(new string[] { @"50000&2000000&574&E:\winprop\gongcan\ningbo.xlsx&E:\winprop\output\ningbo4_5&E:\winprop\output\ningbo4_5\combine&E:\winprop\output\ningbo4_5\combine\201805212244313796821.csv&13522259.1830952_3476656.07993364" });
            string f = @"d:\winprop\output";
            string[] nodeFolder = Directory.GetDirectories(f);

            int floorNum = Convert.ToInt32(GetName(nodeFolder[0]));
        }

        private static string GetName(string str)
        {
            if (string.IsNullOrEmpty(str)) return "";

            if (str.Length > 0)
            {
                if (str.LastIndexOf("/") > 0)
                {
                    str = str.Substring(str.LastIndexOf("/") + 1);
                }
                else if (str.LastIndexOf("\\") > 0)
                {
                    str = str.Substring(str.LastIndexOf("\\") + 1);
                }
            }
            return str;
        }
    }
}
